Security Guard
it is a smart robot to replace human in certain places such as home, offices, server room and ensure real time monitoring and security in the environment its placed in
it is a smart robot to replace human in certain places such as home, offices, server room and ensure real time monitoring and security in the environment its placed in
⬤ Installing motors on 4WD board
⬤ installing wheels on motors
⬤ connect cables to the board
⬤ set and customize the servo motors on bottom part
and top part
⬤ install distance sensor on top part
⬤ install camera on top part
⬤ join the two parts (bottom and top)
⬤ install the head part on 4WD board
⬤ connect cables to the board
⬤ set the standoffs
⬤ installing wheels on motors
⬤ content cables on board
⬤ install standoffs 10 on board
⬤ set line tracker on standoffs
⬤ content cables on board
⬤ connect pi camera on pi port
⬤ connect distance sensor on board
⬤ content servo motors connectors on board
⬤ content batteries on board
⬤ install OS raspbian 32
¶
using raspberry pi Imager v1.7
⬤ update and upgrade apt packages
⬤ enable ssh, camera, I2C, Remote GPIO, and VNC
#Run the following command
# 1 to make sure that the system is uptodate
raspberry@Host:~$ sudo apt-get update && sudo apt-get upgrade
# 2 to enable interface features on pi
raspberry@Host:~$ sudo raspi-config
⬤ Installing python 3
⬤ installing Freenove_RPI_WS281x_Python library
⬤ installing python3-dev library
⬤ installing python3-pyqt5 library
#Run the following command
# 1 install python
raspberry@Host:~$
sudo apt-get install python python3
# 2 install dependencies
raspberry@Host:~$
sudo apt-get install -y python3-dev python3-pyqt5
# 3 clone python library from freenove for 4wd Smart car
raspberry@Host:~$
git clone https://github.com/Freenove/Freenove_RPI_WS281x_Python.git
⬤ $ install libportaudio0 libportaudio2
⬤ $ create virtual environment
⬤ $ activate the virtual environment
⬤ $ install pyaudio requests websockets using
pip
#Run the following command
# 1 to install libraries
raspberry@Host:~$
sudo apt-get install libportaudio0 libportaudio2
libportaudiocpp0 portaudio19-dev flac
# 2 create virtual environment
raspberry@Host:~$
python3 -m venv venv
# 3 activate virtual environment
raspberry@Host:~$
. venv/bin/activate
# 4 install dependencies inside the virtual environment
raspberry@Host:~$
pip install pyaudio requests websockets
⬤ $ install ssmtp mailutils
⬤ $ create a gmail account for the smart car
⬤ $ create app password to allow python login and
⬤ $ create a python script to send email from
the
# import dependencies
import smtplib
import os
from email.message import EmailMessage
from datetime import datetime
# get current date and time
currentTime = datetime.now().strftime("%H:%M:%S")
# declare credentials for login
Email = os.environ.get('ADMIN_EMAIL')
Password = os.environ.get('ADMIN_PASSWORD')
# send message to
Receiver = "godsaveme2001@gmail.com"
# setup the server connection
mailServer = smtplib.SMTP_SSL('smtp.gmail.com', 465)
# Message
messageToSend = EmailMessage()
messageToSend['Subject'] = 'evening summary'
messageToSend['From'] = Email
messageToSend['TO'] = Receiver
messageToSend.set_content(f"This is your evening summary from smart car \n at {currentTime}all looks good!")
# check if login is successful if not print a message
try:
mailServer.login(Email, Password)
except NameError as loginError:
print(f"an error occur while trying to login please check the credentials \n [{loginError}]" )
# send email and if an error occurs print a message
try:
mailServer.send_message(messageToSend)
except NameError as sendMessageError:
print(f"An exception occurred \n {sendMessageError}")
print("mail has been sent successfully!")
# close connection
mailServer.quit()
⬤ create bash file autoStart.sh
⬤ edit configuration file to auto start autoStart.sh
⬤ Installing motors on 4WD board
⬤ installing wheels on motors
⬤ content cables on board
⬤ Installing motors on 4WD board
⬤ installing wheels on motors
⬤ content cables on board
⬤ Installing motors on 4WD board
⬤ installing wheels on motors
⬤ content cables on board
⬤ Installing motors on 4WD board
⬤ installing wheels on motors
⬤ content cables on board
⬤ Installing motors on 4WD board
⬤ installing wheels on motors
⬤ content cables on board
⬤ Installing motors on 4WD board
⬤ installing wheels on motors
⬤ content cables on board
⬤ Installing motors on 4WD board
⬤ installing wheels on motors
⬤ content cables on board